import Alert from './index.vue';
import Vue from 'vue';

const $alert = (tip,time) => {
    let Com = Vue.extend(Alert);

    let vm = new Com({
        propsData:{
            tip,
            time
        }
    });

    vm.$mount();

    document.body.appendChild(vm.$el);
}

export {$alert  as  Alert}

export default {
    install(Vue){
        Vue.prototype.$alert = $alert;
    }
}